program Task1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
                                  
var
  a, b, c, d, i:integer;
begin
  readln(a, b, c);
  if (a<=b) and (a<=c) then
    d:=a;
  if (b<=a) and (b<=c) then
    d:=b;
  if (c<=b) and (c<=a) then
    d:=c;
  for i:= 1 to d do
  begin
    if ((a mod i)+(b mod i)+(c mod i)=0) then
      writeln(i);
  end;
  readln;
end.
